title = "新品"
url = "/sale.html"
layout = 'default'
==
<link rel="stylesheet" type="text/css" href="{{ 'assets/special/css/special.css'|theme }}">
<div class="category_content">
      <div id="popup" class="pop1">
          <div class="goShow"></div>
          <ul class="r_nav">
              <li class="lis active"><a href="#indexCategory_li1" style="background: #84c8d1"  >売れ筋ランキング</a></li>
              <li class="lis"><a href="#indexCategory_li2" style="background: #88e49c"  >超目玉特集</a></li>
              <li class="lis"><a href="#indexCategory_li3" style="background: #ffa399"  >人気アイテム</a></li>
          </ul>
      </div>
    <div class="itemList">
        <ul class="listUl">
            <li class="saleHead saleHead1"><span >売れ筋ランキング</span></li>
            {% set products = catalog.productSection('m-sale-pro1').items %}
            {% partial 'catalog/list-products2' products = products %}
        </ul>
        <ul class="listUl">
            <li class="saleHead saleHead2"><span >超目玉特集</span></li>
            {% set products = catalog.productSection('m-sale-pro2').items %}
            {% partial 'catalog/list-products2' products = products %}
        </ul>
        <ul class="listUl">
            <li class="saleHead saleHead3"><span >人気アイテム</span></li>
            {% set products = catalog.productSection('m-sale-pro3').items %}
            {% partial 'catalog/list-products2' products = products %}
        </ul>
    </div>
</div>
{% put scripts %}
<script>
$(function(){
    /**/
      $("#popup .goShow").click(function(){
          $(this).toggleClass("goHide");
          $(this).next().toggleClass("show");
      })
    var AllHet = $(window).height();
    $('#popup .r_nav .lis').click(function(){
        var ind = $('#popup .r_nav .lis').index(this);
        var topVal = $('.itemList .listUl').eq(ind).offset().top -98;
        $('body,html').animate({scrollTop:topVal},200)
    })
   $(window).scroll(scrolls)
   scrolls()
   function scrolls(){
        var arr = new Array(3)
        var fixRight = $('#popup .r_nav .lis');
        var sTop = $(window).scrollTop();

        for(var i=0;i<arr.length;i++){
          arr[i] = $('.itemList .listUl').eq(i).offset().top-100;
          if(sTop > arr[i]){
            fixRight.eq(i).addClass('active').siblings().removeClass('active');
          }
        }
    }
})


</script>
{% endput %}